package com.splic.web.controller.task;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created by IntelliJ IDEA.
 * User: Singe
 * Date: 2018\8\20 0020
 * Time: 22:35
 * To change this template use File | Settings | File Templates.
 */
@Component
public class ScheduledData {

//    @Autowired
//    private ISysTitleService sysTitleService;
//    @Autowired
//    private ISysQuestionService sysQuestionService;
//    @Autowired
//    private ISysAnswerService sysAnswerService;
    /**
     * 每30分钟
     */
//    @Scheduled(cron = "0 0/1 * * * ? ")
    @Scheduled(cron = "0 34 23 * * ? ")
    public void cusAutoSpeed() {
        /*List<SysTitle> sysTitleList = sysTitleService.selectSysTitleList( new SysTitle());
        if(sysTitleList!=null){
            int i =  sysTitleService.insertBatchBak(sysTitleList);
            System.out.println("sysTitle-----"+i);
        }

        List<SysQuestion> sysQuestionList = sysQuestionService.selectSysQuestionList( new SysQuestion());
        if(sysQuestionList!=null){
            int i =  sysQuestionService.insertBatchBak(sysQuestionList);
            System.out.println("SysQuestion----"+i);
        }

        List<SysAnswer> sysAnswerList = sysAnswerService.selectSysAnswerList( new SysAnswer());
        if(sysAnswerList!=null){
            int i =  sysAnswerService.insertBatchBak(sysAnswerList);
            System.out.println("SysAnswer----"+i);
        }*/
    }



}
